/* --- CSS Variables --- */
:root {
  --gold: #c9a227;
  --gold-light: #e8c547;
  --gold-dark: #a68520;
  --gold-glow: rgba(201, 162, 39, 0.35);
  --black: #0a0a0a;
  --black-soft: #141414;
  --gray-dark: #1e1e1e;
  --gray-mid: #2a2a2a;
  --gray-text: #6b6b6b;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --cream: #faf9f6;

  --bg-primary: var(--off-white);
  --bg-secondary: var(--white);
  --bg-card: var(--white);
  --text-primary: var(--black);
  --text-secondary: var(--gray-text);
  --border-color: rgba(201, 162, 39, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(201, 162, 39, 0.18);
  --nav-bg: rgba(248, 247, 244, 0.92);
  --gradient-hero: linear-gradient(135deg, var(--off-white) 0%, #f0ebe0 50%, var(--off-white) 100%);
  --gradient-gold: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  --gradient-dark: linear-gradient(135deg, var(--black) 0%, var(--gray-dark) 100%);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --section-padding: 100px 0;

  --img-bg-black: invert(1); 
}

/* Dark mode variables */
[data-theme="dark"] {
  --img-bg-white: var(--img-bg-black);
  --bg-primary: var(--black);
  --bg-secondary: var(--black-soft);
  --bg-card: var(--gray-dark);
  --text-primary: var(--off-white);
  --text-secondary: #a0a0a0;
  --border-color: rgba(201, 162, 39, 0.25);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 40px rgba(201, 162, 39, 0.15);
  --nav-bg: rgba(10, 10, 10, 0.95);
  --gradient-hero: linear-gradient(135deg, var(--black) 0%, var(--gray-dark) 50%, var(--black) 100%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
}

.gold-text {
  color: var(--gold);
}

/* --- Section Divider --- */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--black);
  box-shadow: 0 4px 16px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--gold-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--black);
  color: var(--gold);
  border-color: var(--black);
}

[data-theme="dark"] .btn-dark {
  background: var(--gold);
  color: var(--black);
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-logo span {
  color: var(--gold);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--gold);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--gold);
  color: var(--black);
  transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 520px;
}

/* Code Card Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow), 0 0 60px var(--gold-glow);
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform var(--transition);
}

.code-card:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.code-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--gray-dark);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .code-card-header {
  background: var(--black);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-card-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #888;
}

.code-card-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.code-line { display: block; }
.code-keyword { color: var(--gold); }
.code-string { color: #6aab73; }
.code-comment { color: #666; font-style: italic; }
.code-function { color: #61afef; }
.code-variable { color: #e5c07b; }

.profile-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--gradient-gold);
  padding: 4px;
  margin: 0 auto 20px;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gray-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-heading);
}

/* --- Sections --- */
section {
  padding: var(--section-padding);
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

 .about-image-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/4;
  border: 2px solid var(--border-color);
}
.about-initials {
  color: var(--gold);
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.about-highlight {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

.about-highlight:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.about-highlight strong {
  display: block;
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* --- Skills Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.skill-card {
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}

.skill-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.skill-icon {
  width: 50px;
  justify-self: center;
  margin-bottom: 10px;
  font-size: 10px;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --- Project Cards --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

.project-card.hidden {
  display: none;
}

.project-preview {
  height: 100%;
}

.project-preview-icon {
  object-fit: fill !important;
  z-index: 1;
}

.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-cta {
  text-align: center;
  margin-top: 48px;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

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

.service-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-gold);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- AfnixByte Section --- */
.afnixbyte-section {
  background: var(--gradient-dark);
  color: var(--off-white);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: url("assests/AfnixByte-lg-Logo-RemoveBG.png");
  width: 100%;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-blend-mode: darken;
  background-color: rgba(0, 0, 0, 0.9);
}

.afnixbyte-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, var(--gold-glow), transparent 60%);
  pointer-events: none;
}

.afnixbyte-section .section-title {
  color: var(--white);
}

.afnixbyte-section .section-subtitle {
  color: #ccc;
  margin-left: auto;
  margin-right: auto;
}

.afnixbyte-logo {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 24px;
}

/* --- Soft Skills --- */
.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.soft-skill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.soft-skill-item:hover {
  border-color: var(--gold);
  transform: translateX(4px);
}

.soft-skill-icon {
  color: var(--gold);
  font-size: 1.2rem;
}

.achievement-box {
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.05));
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  text-align: center;
}

.achievement-box h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.achievement-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  font-size: 0.95rem;
}

.contact-link:hover {
  border-color: var(--gold);
  transform: translateX(6px);
  color: var(--gold);
}

.contact-link-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-link-icon img{
  width: 22px;
  filter: var(--img-bg-white);
  font-size: 8px;
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
}

.form-error {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 6px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-success {
  display: none;
  padding: 16px;
  background: rgba(40, 200, 64, 0.1);
  border: 1px solid #28c840;
  border-radius: var(--radius-sm);
  color: #28c840;
  text-align: center;
  margin-top: 16px;
  font-weight: 500;
}

.form-success.visible {
  display: block;
}

/* --- Footer --- */
.footer {
  background: var(--black);
  color: #888;
  padding: 20px 0;
  text-align: center;
}
.footer .container{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.footer p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer .gold-text {
  color: var(--gold);
}

.footer a {
  color: var(--gold);
}

/* --- Projects Page --- */
.page-hero {
  padding: 140px 0 80px;
  background: var(--gradient-hero);
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.page-hero .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.page-hero .btn-group {
  justify-content: center;
}

/* Filter Buttons */
.filter-section {
  padding: 40px 0;
  background: var(--bg-secondary);
  position: sticky;
  top: 72px;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.filter-btn {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* Stats Section */
.stats-section {
  background: var(--gradient-dark);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 24px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: #aaa;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 80px 0;
  background: var(--bg-secondary);
}

.cta-section .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-group {
  justify-content: center;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hide Link Box --- */
.hide-link-box {
  display: none;
}

.show-link-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  position: fixed;
  top: 15px;
  left: 50%;
  translate: -50% 0;
  background-color: var(--bg-primary) ;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 0 5px var(--gold-glow);
  border: 2px solid var(--gold-light);
  width: fit-content;
  height: fit-content;
  z-index: 1001;
}

.show-link-box p{
  color: var(--text-secondary);
  font-size: 15px;
}


/* --- Responsive --- */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .code-card {
    max-width: 380px;
    transform: none;
  }

  .about-image-box {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .filter-section {
    top: 72px;
    padding: 20px 0;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .contact-form {
    padding: 24px;
  }

  .footer .container{
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .stat-number {
    font-size: 2rem;
  }

  .show-link-box {
    width: 90%;
    padding: 5px;
  }
}
