/* ============================================
   2026 MODERN PORTFOLIO - Ryan Amir
   ============================================ */

/* Custom Properties */
:root {
  /* Dark sophisticated palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(26, 26, 37, 0.7);
  
  /* Accent colors - vibrant teal/cyan with warm contrast */
  --accent-primary: #00d4aa;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #00d4aa 0%, #7c3aed 50%, #f59e0b 100%);
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  
  /* Glass effect */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.8s;

  /* Safe-area insets (iOS notch, etc.) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Approx nav offset used to keep hero content from hiding under fixed nav */
  --nav-offset: 96px;
}

/* iOS 11.0–11.2 legacy safe-area syntax */
@supports (padding-top: constant(safe-area-inset-top)) {
  :root {
    --safe-top: constant(safe-area-inset-top);
    --safe-bottom: constant(safe-area-inset-bottom);
  }
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.015;
  z-index: 10000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Container */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Section Padding */
.section-padding {
  padding: 120px 0;
  position: relative;
}

.section-dark {
  background-color: var(--bg-secondary);
}

.text-center {
  text-align: center;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  margin-bottom: 16px;
  padding: 8px 20px;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius-full);
}

.section-subtitle::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 24px;
  color: var(--text-primary);
  position: relative;
}

.section-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 0 auto;
  border-radius: var(--radius-full);
}

/* ============================================
   HEADER / HERO
   ============================================ */
header {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Animated gradient orbs */
header::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation: float-orb 20s ease-in-out infinite;
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
  animation: float-orb 25s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Hero background image with overlay */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.3;
  filter: grayscale(30%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 15, 0.4) 0%,
    rgba(10, 10, 15, 0.8) 50%,
    var(--bg-primary) 100%
  );
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  padding-top: calc(24px + var(--safe-top));
  z-index: 1000;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
  padding-top: calc(16px + var(--safe-top));
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  width: 100px;
  transition: transform var(--duration-normal) var(--ease-out-expo);
  filter: brightness(1.1);
}

.logo:hover {
  transform: scale(1.05);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out-expo);
  position: relative;
}

nav ul li a:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

nav ul li a.active {
  color: var(--accent-primary);
  background: rgba(0, 212, 170, 0.1);
}

/* Mobile menu */
.menu-icon {
  display: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all var(--duration-fast) var(--ease-out-expo);
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.menu-icon:hover,
.menu-icon:focus {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.menu-icon:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.bar {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

/* Header Content */
.header-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-lg);
  /* Prevent iOS Safari from visually cutting content under fixed nav / notch */
  padding-top: var(--nav-offset);
  margin-top: 0;
}

.header-text {
  max-width: 800px;
}

.header-text .subtitle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 24px;
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.header-text .subtitle::before {
  content: '—';
  color: var(--accent-secondary);
}

.header-text h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1;
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) 0.3s forwards;
}

.header-text h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) 0.4s forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Buttons */
.header-buttons {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) 0.5s forwards;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  transition: all var(--duration-normal) var(--ease-out-expo);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: var(--glass-bg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-3px);
}

.btn-text {
  background: none;
  color: var(--accent-primary);
  padding: 0;
}

.btn-text i {
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.btn-text:hover i {
  transform: translateX(5px);
}

.btn-download {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-download:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.about-image {
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.image-frame::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.5;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.about-image:hover .image-frame::before {
  top: 15px;
  left: 15px;
}

.about-image img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.about-image:hover img {
  transform: scale(1.02);
}

/* Floating badge on image */
.image-frame::after {
  content: '3+ Years Experience';
  position: absolute;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
}

.about-text {
  flex: 1;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
  line-height: 1.8;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.tab-button {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.tab-button:hover {
  color: var(--text-secondary);
}

.tab-button.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s var(--ease-out-expo);
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skills */
.skill-list {
  list-style: none;
}

.skill-list li {
  margin-bottom: 24px;
}

.skill-list li span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.skill-level {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  position: relative;
  transition: width 1.5s var(--ease-out-expo);
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 7px;
  height: 100%;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--glass-border);
}

.timeline-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.2);
}

.timeline-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.timeline-content span {
  display: inline-block;
  font-size: 13px;
  color: var(--accent-primary);
  margin-bottom: 12px;
  padding: 4px 12px;
  background: rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-full);
}

.timeline-content p {
  color: var(--text-secondary);
}

/* Experience List */
.experience-list {
  list-style: none;
  margin-top: 12px;
}

.experience-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 15px;
}

.experience-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.cert-item {
  background: var(--bg-tertiary);
  padding: 24px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.cert-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.1);
}

.cert-item i {
  font-size: 36px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  display: block;
}

.cert-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cert-item h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.cert-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.service-card:hover .service-icon {
  background: var(--accent-primary);
}

.service-icon i {
  font-size: 28px;
  color: var(--accent-primary);
  transition: color var(--duration-fast);
}

.service-card:hover .service-icon i {
  color: var(--bg-primary);
}

.service-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.filter-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  font-family: 'Outfit', sans-serif;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}

.filter-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 212, 170, 0.3);
}

.portfolio-img {
  overflow: hidden;
  aspect-ratio: 16/10;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.portfolio-item:hover .portfolio-img img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 10, 15, 0.5) 50%,
    rgba(10, 10, 15, 0.95) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-info {
  color: var(--text-primary);
  transform: translateY(20px);
  transition: transform var(--duration-normal) var(--ease-out-expo);
  width: 100%;
}

.portfolio-item:hover .portfolio-info {
  transform: translateY(0);
}

.portfolio-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.portfolio-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  color: var(--bg-primary);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.portfolio-link:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 212, 170, 0.4);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.contact-card:hover {
  border-color: var(--accent-primary);
  transform: translateX(5px);
}

.contact-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 22px;
  color: var(--accent-primary);
}

.contact-details h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.contact-details p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 12px;
  margin: 32px 0;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.social-icons a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-5px);
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.1);
}

.form-group textarea {
  height: 160px;
  resize: none;
}

.form-message {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  min-height: 50px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-secondary);
  padding: 80px 0 24px;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo img {
  width: 100px;
  margin-bottom: 20px;
  filter: brightness(1.1);
}

.footer-logo p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.footer-links h3,
.footer-newsletter h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: all var(--duration-fast) var(--ease-out-expo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links ul li a:hover {
  color: var(--accent-primary);
  transform: translateX(5px);
}

.footer-newsletter p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 15px;
}

.newsletter-form {
  display: flex;
  gap: 0;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
}

.newsletter-form input::placeholder {
  color: var(--text-muted);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.newsletter-form button {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 0 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.newsletter-form button:hover {
  background: #00b894;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 14px;
}

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out-expo);
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-5px);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out-expo);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet and below */
@media (max-width: 1024px) {
  :root {
    --nav-offset: 88px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  
  .about-image {
    max-width: 450px;
    margin: 0 auto;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  :root {
    --space-lg: 1.25rem;
    --nav-offset: 80px;
  }
  
  /* Navigation - Fixed for notch/safe area */
  nav {
    padding: 12px 0;
    padding-top: max(12px, var(--safe-top));
  }
  
  nav.scrolled {
    padding: 10px 0;
    padding-top: max(10px, var(--safe-top));
  }
  
  .logo {
    width: 80px;
  }
  
  nav ul {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 100px 24px 40px;
    padding-top: calc(80px + var(--safe-top) + 48px);
    padding-bottom: calc(40px + var(--safe-bottom));
    flex-direction: column;
    gap: 0;
    z-index: 999;
    overflow-y: auto;
  }
  
  nav ul.show {
    display: flex;
  }
  
  nav ul li {
    margin: 0;
  }
  
  nav ul li a {
    display: block;
    padding: 18px 0;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    background: transparent;
    /* Ensure good touch target */
    min-height: 56px;
    display: flex;
    align-items: center;
  }
  
  nav ul li a:hover,
  nav ul li a.active {
    background: transparent;
    color: var(--accent-primary);
  }
  
  .menu-icon {
    display: flex;
    width: 48px;
    height: 48px;
  }
  
  .menu-icon.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .menu-icon.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-icon.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* Hero */
  .header-content {
    padding: 0 var(--space-lg);
    padding-top: var(--nav-offset);
    margin-top: 0;
  }
  
  .header-text .subtitle {
    font-size: 14px;
    margin-bottom: 16px;
  }
  
  .header-text h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
    margin-bottom: 16px;
  }
  
  .header-text h2 {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
  }
  
  .header-buttons {
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
  }
  
  .header-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    min-height: 52px;
  }
  
  /* Sections */
  .section-padding {
    padding: 70px 0;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .section-subtitle {
    font-size: 12px;
    padding: 6px 14px;
  }
  
  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  
  /* About */
  .about-image {
    max-width: 100%;
  }
  
  .image-frame::before {
    top: 12px;
    left: 12px;
    right: -12px;
    bottom: -12px;
  }
  
  .image-frame::after {
    font-size: 12px;
    padding: 10px 14px;
    bottom: 12px;
    right: 12px;
  }
  
  .about-text p {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  /* Tabs */
  .tabs {
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
  }
  
  .tab-button {
    flex: 1 1 calc(50% - 6px);
    padding: 12px 8px;
    font-size: 13px;
    min-height: 44px;
  }
  
  /* Timeline */
  .timeline {
    padding-left: 24px;
  }
  
  .timeline-dot {
    left: -24px;
    width: 12px;
    height: 12px;
  }
  
  .timeline-content h3 {
    font-size: 16px;
    line-height: 1.4;
  }
  
  .timeline-content span {
    font-size: 12px;
  }
  
  .experience-list li {
    font-size: 14px;
    padding-left: 20px;
    margin-bottom: 8px;
  }
  
  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .service-card {
    padding: 28px 24px;
  }
  
  .service-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
  }
  
  .service-icon i {
    font-size: 24px;
  }
  
  .service-card h3 {
    font-size: 20px;
  }
  
  .service-card p {
    font-size: 14px;
  }
  
  /* Portfolio */
  .portfolio-filter {
    gap: 8px;
    margin-bottom: 32px;
    padding: 0 4px;
  }
  
  .filter-btn {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 44px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .portfolio-img {
    aspect-ratio: 16/9;
  }
  
  /* Show overlay on mobile since no hover */
  .portfolio-overlay {
    opacity: 1;
    background: linear-gradient(
      180deg,
      transparent 0%,
      transparent 30%,
      rgba(10, 10, 15, 0.95) 100%
    );
  }
  
  .portfolio-info {
    transform: translateY(0);
  }
  
  .portfolio-info h3 {
    font-size: 18px;
  }
  
  .portfolio-info p {
    font-size: 13px;
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }
  
  .portfolio-link {
    width: 48px;
    height: 48px;
  }
  
  /* Contact */
  .contact-card {
    padding: 16px;
    gap: 16px;
  }
  
  .contact-icon {
    width: 48px;
    height: 48px;
  }
  
  .contact-icon i {
    font-size: 20px;
  }
  
  .contact-details h3 {
    font-size: 15px;
  }
  
  .contact-details p {
    font-size: 14px;
    word-break: break-word;
  }
  
  .social-icons {
    justify-content: center;
    margin: 24px 0;
  }
  
  .social-icons a {
    width: 48px;
    height: 48px;
  }
  
  .btn-download {
    width: 100%;
    justify-content: center;
  }
  
  .contact-form {
    padding: 24px 20px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .form-group textarea {
    height: 140px;
  }
  
  .contact-form .btn {
    width: 100%;
    min-height: 52px;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  
  .footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }
  
  .footer-links ul li {
    margin-bottom: 0;
  }
  
  .footer-links ul li a {
    padding: 8px;
  }
  
  .footer-links ul li a:hover {
    transform: none;
  }
  
  .newsletter-form {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding-top: 20px;
  }
  
  .back-to-top {
    opacity: 1;
    visibility: visible;
    position: relative;
  }
  
  /* Certifications */
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .cert-item {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }
  
  .cert-item i {
    font-size: 28px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .cert-item h3 {
    font-size: 14px;
  }
}

/* iOS Safari: align nav closer to top (avoid extra offset) */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    nav {
      padding-top: 12px;
    }

    nav.scrolled {
      padding-top: 10px;
    }
  }
}

/* Small phones */
@media (max-width: 380px) {
  .container {
    padding: 0 12px;
  }
  
  .header-text h1 {
    font-size: 2rem;
  }
  
  .header-text h2 {
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .tab-button {
    font-size: 11px;
    padding: 10px 6px;
  }
  
  .timeline-content h3 {
    font-size: 15px;
  }
  
  .experience-list li {
    font-size: 13px;
  }
  
  .filter-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .contact-details p {
    font-size: 13px;
  }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
  header {
    min-height: auto;
    padding: 100px 0 60px;
  }
  
  .header-content {
    margin-top: 0;
  }
  
  .section-padding {
    padding: 50px 0;
  }
}

/* Touch device specific - ensure interactive elements are visible */
@media (hover: none) and (pointer: coarse) {
  .portfolio-overlay {
    opacity: 1;
  }
  
  .portfolio-info {
    transform: translateY(0);
  }
  
  .service-card:hover {
    transform: none;
  }
  
  .portfolio-item:hover {
    transform: none;
  }
  
  .contact-card:hover {
    transform: none;
  }
  
  /* Increase touch targets */
  .btn {
    min-height: 48px;
  }
  
  .filter-btn {
    min-height: 44px;
  }
  
  .tab-button {
    min-height: 44px;
  }
  
  .social-icons a {
    min-width: 48px;
    min-height: 48px;
  }
  
  .portfolio-link {
    min-width: 48px;
    min-height: 48px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   CUSTOM CURSOR (Desktop only)
   ============================================ */
@media (hover: hover) and (pointer: fine) {
  .cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
    mix-blend-mode: difference;
  }
  
  .cursor.hover {
    transform: scale(2);
    background: rgba(0, 212, 170, 0.1);
  }
}

/* Typing cursor */
.typing-effect::after {
  content: "|";
  animation: blink 0.8s infinite;
  color: var(--accent-primary);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Smooth image loading */
img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img.loaded {
  opacity: 1;
}

/* Portfolio fade-in animation (used by filter JS) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

