/* =============================================
   G KARTHIK PORTFOLIO — WHITE & NAVY PREMIUM
   ============================================= */

:root {
  --navy:       #0F2A4A;
  --navy-dark:  #091D35;
  --navy-mid:   #1A3F6F;
  --off-white:  #F7F9FC;
  --text-main:  #0F2A4A;
  --text-muted: #64748B;
  --border:     #E2E8F0;
  --border-acc: rgba(15,42,74,0.15);
  --gold-pale:  rgba(15,42,74,0.06);
  --radius:     10px;
  --radius-lg:  16px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Outfit', sans-serif; background: #F7F9FC; color: var(--text-main); line-height: 1.7; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.2; }
p { color: var(--text-muted); }
p strong, p em { color: var(--text-main); }
a { text-decoration: none; color: inherit; }
section { padding: 6rem 0; }
.section-inner { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }
.section-label { font-family: 'Outfit', sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--navy-mid); margin-bottom: 0.6rem; }
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--navy-dark); margin-bottom: 1rem; }
.section-sub { font-size: 1rem; margin-bottom: 3rem; max-width: 560px; color: var(--text-muted); }

/* BUTTONS */
.btn-gold { display: inline-block; padding: 0.65rem 1.5rem; background: var(--navy); color: #fff; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.88rem; border-radius: 6px; border: none; cursor: pointer; transition: var(--transition); }
.btn-gold:hover { background: var(--navy-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,42,74,0.2); }
.btn-outline { display: inline-block; padding: 0.65rem 1.5rem; background: transparent; color: var(--navy); font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.88rem; border-radius: 6px; border: 1.5px solid var(--navy); cursor: pointer; transition: var(--transition); }
.btn-outline:hover { background: var(--gold-pale); }

/* NAV */
#navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0.9rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--navy-dark); }
.nav-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition); }
.nav-links a:hover { color: var(--navy); }
.nav-cta { padding: 0.45rem 1.2rem; border: 1.5px solid var(--navy) !important; border-radius: 6px; color: var(--navy) !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--navy) !important; color: #fff !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }
.mobile-menu { display: none; flex-direction: column; padding: 1rem 2rem 1.5rem; gap: 1rem; border-top: 1px solid var(--border); background: #fff; }
.mobile-menu a { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.mobile-menu.open { display: flex; }

/* HERO */
#hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding: 8rem 2rem 4rem; overflow: hidden; background: #fff; }
.hero-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(15,42,74,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(15,42,74,0.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%); }
#hero::before { content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(15,42,74,0.05) 0%, transparent 70%); pointer-events: none; }
.hero-content { text-align: center; max-width: 820px; position: relative; z-index: 1; animation: fadeUp 0.8s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.hero-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--navy-mid); margin-bottom: 1.2rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.hero-label::before, .hero-label::after { content: ''; display: block; width: 40px; height: 1px; background: var(--navy-mid); opacity: 0.4; }
.hero-title { font-size: clamp(3.5rem, 8vw, 6.5rem); color: var(--navy-dark); letter-spacing: -0.03em; line-height: 1.0; margin-bottom: 1.2rem; }
.hero-title span { color: var(--navy-mid); position: relative; }
.hero-title span::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 3px; background: var(--navy); opacity: 0.15; border-radius: 2px; }
.hero-sub { font-size: 1.05rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 2.5rem; line-height: 1.75; }
.hero-metrics { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; margin-bottom: 2.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 2px 20px rgba(15,42,74,0.06); overflow: hidden; }
.metric { display: flex; flex-direction: column; align-items: center; padding: 1.4rem 2.2rem; flex: 1; min-width: 120px; }
.metric-num { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: var(--navy-dark); line-height: 1; }
.metric-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.3rem; text-align: center; letter-spacing: 0.05em; }
.metric-divider { width: 1px; background: var(--border); flex-shrink: 0; align-self: stretch; }
.hero-btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.9rem 2.2rem; background: var(--navy); color: #fff; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; border-radius: 8px; transition: var(--transition); box-shadow: 0 4px 16px rgba(15,42,74,0.2); }
.hero-btn:hover { background: var(--navy-mid); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15,42,74,0.25); }
.hero-btn span { animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.hero-scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-muted); opacity: 0.5; }

/* PROJECTS */
#projects { background: var(--off-white); }
.personal-banner { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding: 0.7rem 1.2rem; background: #fff; border-left: 3px solid var(--navy); border-radius: 0 8px 8px 0; box-shadow: 0 1px 4px rgba(15,42,74,0.06); }
.pb-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--navy); white-space: nowrap; }
.pb-note { font-size: 0.83rem; color: var(--text-muted); }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.project-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; transition: var(--transition); position: relative; overflow: hidden; }
.project-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--navy); transform: scaleX(0); transform-origin: left; transition: var(--transition); }
.project-card:hover { border-color: var(--border-acc); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(15,42,74,0.10); }
.project-card:hover::after { transform: scaleX(1); }
.project-card.pro { background: #FAFBFD; }
.card-tag { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--navy-mid); margin-bottom: 0.75rem; }
.card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.project-card h3 { font-size: 1.4rem; color: var(--navy-dark); margin-bottom: 0.6rem; }
.card-desc { font-size: 0.88rem; margin-bottom: 1.25rem; line-height: 1.7; color: var(--text-muted); }
.card-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.4rem; }
.card-chips span { font-size: 0.7rem; font-weight: 500; padding: 0.25rem 0.65rem; background: #EFF4FA; color: var(--navy); border-radius: 4px; border: 1px solid rgba(15,42,74,0.1); }
.card-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.pro-impact { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.pro-impact span { font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.7rem; background: #EFF4FA; color: var(--navy); border-radius: 4px; border: 1px solid rgba(15,42,74,0.1); }

/* ABOUT */
#about { background: #fff; }
.about-inner { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
.about-text p { margin-bottom: 1.1rem; font-size: 0.96rem; line-height: 1.8; }
.about-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.about-card { background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; transition: var(--transition); }
.about-card:hover { border-color: var(--border-acc); box-shadow: 0 4px 16px rgba(15,42,74,0.06); }
.ac-label { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-mid); margin-bottom: 0.35rem; font-weight: 700; }
.ac-value { font-size: 0.9rem; color: var(--text-main); }
.gold-card { background: #EFF4FA; border-color: rgba(15,42,74,0.2); }

/* SKILLS */
#skills { background: var(--off-white); }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.skill-group { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: var(--transition); }
.skill-group:hover { border-color: var(--border-acc); box-shadow: 0 4px 16px rgba(15,42,74,0.06); }
.skill-group h4 { font-size: 0.75rem; font-weight: 700; font-family: 'Outfit', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--navy); display: inline-block; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }
.skill-pills span { font-size: 0.75rem; padding: 0.28rem 0.65rem; background: #F1F5F9; color: var(--text-main); border: 1px solid var(--border); border-radius: 4px; transition: var(--transition); }
.skill-pills span:hover { background: #EFF4FA; color: var(--navy); border-color: rgba(15,42,74,0.2); }

/* EXPERIENCE */
#experience { background: #fff; }
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--navy), rgba(15,42,74,0.1)); }
.tl-item { position: relative; margin-bottom: 2rem; }
.tl-dot { position: absolute; left: -2.5rem; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--navy); }
.tl-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: 0 2px 12px rgba(15,42,74,0.05); }
.tl-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.4rem; flex-wrap: wrap; gap: 0.5rem; }
.tl-content h3 { font-size: 1.4rem; color: var(--navy-dark); }
.tl-company { font-size: 0.92rem; color: var(--navy-mid); margin-top: 0.15rem; font-weight: 600; }
.tl-date { font-size: 0.75rem; font-weight: 600; color: var(--navy); background: #EFF4FA; border: 1px solid rgba(15,42,74,0.15); padding: 0.3rem 0.8rem; border-radius: 4px; white-space: nowrap; }
.tl-industry { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.tl-project-label { font-size: 0.78rem; font-weight: 600; color: var(--navy); background: #EFF4FA; border-left: 2px solid var(--navy); padding: 0.4rem 0.75rem; border-radius: 0 4px 4px 0; margin-bottom: 1rem; }
.tl-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.tl-list li { font-size: 0.9rem; color: var(--text-muted); padding-left: 1.2rem; position: relative; line-height: 1.65; }
.tl-list li::before { content: '▸'; position: absolute; left: 0; color: var(--navy); font-size: 0.75rem; }
.tl-list li strong { color: var(--text-main); }

/* CONTACT */
#contact { background: var(--navy-dark); padding: 6rem 0; }
.contact-inner { text-align: center; }
#contact .section-label { color: rgba(255,255,255,0.5); }
#contact .section-title { color: #fff; }
.contact-sub { font-size: 1rem; max-width: 500px; margin: 0 auto 3rem; color: rgba(255,255,255,0.55); }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 680px; margin: 0 auto; }
.contact-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 1.75rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; transition: var(--transition); cursor: pointer; }
.contact-card:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); transform: translateY(-4px); }
.contact-icon { width: 44px; height: 44px; background: rgba(255,255,255,0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.contact-icon svg { width: 20px; height: 20px; color: #fff; }
.cc-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.cc-val { font-size: 0.82rem; color: #fff; font-weight: 500; text-align: center; word-break: break-all; }

/* FOOTER */
footer { background: var(--navy-dark); border-top: 1px solid rgba(255,255,255,0.08); text-align: center; padding: 1.5rem 2rem; }
footer p { font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(9,29,53,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 1rem; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); max-width: 720px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; padding: 2.5rem; animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both; box-shadow: 0 24px 64px rgba(9,29,53,0.2); }
.modal-box--wide { max-width: 900px; }
@keyframes modalIn { from { transform: scale(0.93) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-close { position: absolute; top: 1.2rem; right: 1.2rem; background: #F1F5F9; border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px; border-radius: 50%; font-size: 0.85rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: #EFF4FA; color: var(--navy); border-color: var(--navy); }
.modal-header { margin-bottom: 2rem; }
.modal-tag { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--navy-mid); display: block; margin-bottom: 0.5rem; font-weight: 700; }
.modal-header h2 { font-size: 1.75rem; color: var(--navy-dark); margin-bottom: 0.6rem; }
.modal-header > p { font-size: 0.9rem; }
.sdlc-phases { display: flex; flex-direction: column; gap: 1rem; }
.phase { display: flex; gap: 1.2rem; padding: 1.2rem; background: #FAFBFD; border: 1px solid var(--border); border-radius: var(--radius); transition: var(--transition); }
.phase:hover { border-color: var(--border-acc); background: #EFF4FA; }
.phase-num { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; min-width: 36px; color: var(--navy); line-height: 1; }
.phase-body h4 { font-size: 0.92rem; color: var(--navy-dark); margin-bottom: 0.3rem; font-family: 'Outfit', sans-serif; font-weight: 600; }
.phase-body p, .phase-body li { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }
.phase-body ul { padding-left: 1.1rem; margin-top: 0.3rem; display: flex; flex-direction: column; gap: 0.2rem; }
.user-story-callout { background: #EFF4FA; border-left: 3px solid var(--navy); border-radius: 0 8px 8px 0; padding: 0.9rem 1.2rem; font-size: 0.9rem !important; margin-top: 0.75rem; }
.user-story-callout strong { color: var(--navy); }
.tab-bar { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; overflow-x: auto; }
.tab-btn { padding: 0.6rem 1.2rem; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; color: var(--text-muted); font-family: 'Outfit', sans-serif; font-weight: 500; font-size: 0.85rem; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.ov-card { background: #FAFBFD; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.ov-card h4 { font-size: 0.88rem; color: var(--navy-dark); margin-bottom: 0.5rem; font-family: 'Outfit', sans-serif; font-weight: 600; }
.ov-card p, .ov-card li { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }
.ov-card ul { padding-left: 1rem; margin-top: 0.25rem; }
.swiggy-img-wrap { text-align: center; }
.swiggy-img { max-width: 220px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 0.6rem; box-shadow: 0 4px 16px rgba(15,42,74,0.08); }
.img-caption { font-size: 0.75rem; color: var(--text-muted); }
.doc-frame { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .personal-banner[style*="span 2"] { grid-column: span 1; }
  .project-card[style*="span 2"] { grid-column: span 1; }
}
@media (max-width: 580px) {
  section { padding: 4rem 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-metrics { flex-direction: column; }
  .metric-divider { width: 80%; height: 1px; }
  .modal-box { padding: 1.5rem; }
  .tl-header { flex-direction: column; align-items: flex-start; }
  .contact-cards { grid-template-columns: 1fr; }
}

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
