/* ===========================
   AVINASH MENON — PORTFOLIO
   =========================== */

/* --- Variables --- */
:root {
    --bg:       #0d0d0d;
    --bg2:      #161616;
    --fg:       #f0ece3;
    --muted:    #777;
    --accent:   #c8f060;
    --border:   rgba(255,255,255,0.1);
    --head:     'Syne', sans-serif;
    --body:     'DM Sans', sans-serif;
    --max:      1080px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

/* --- Common --- */
.accent { color: var(--accent); }
.section-label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.5rem; }

/* --- Buttons --- */
.btn-fill {
    display: inline-block;
    background: var(--accent);
    color: #0d0d0d;
    font-family: var(--head);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    transition: background 0.2s, transform 0.2s;
}
.btn-fill:hover { background: #d8ff70; transform: translateY(-2px); }

.btn-outline {
    display: inline-block;
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: var(--head);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-outline.small { padding: 0.45rem 1.1rem; font-size: 0.82rem; }

/* --- Navbar --- */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 5%;
    background: rgba(13,13,13,0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

nav .logo {
    font-family: var(--head);
    font-weight: 800;
    font-size: 1.3rem;
}
nav .logo a { color: inherit; }

nav ul { display: flex; gap: 2rem; }
nav a {
    font-size: 0.88rem;
    color: var(--muted);
    transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--fg); }

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 8% 80px;
    animation: fadeUp 0.7s ease both;
}

.eyebrow { font-size: 0.88rem; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 1rem; opacity: 0.85; }

.hero h1 {
    font-family: var(--head);
    font-weight: 800;
    font-size: clamp(3.2rem, 9vw, 7rem);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 1.4rem;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 460px;
    font-weight: 300;
    margin-bottom: 2.2rem;
}

.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- About --- */
.about {
    padding: 100px 8%;
    border-top: 1px solid var(--border);
    max-width: var(--max);
    margin: 0 auto;
    width: 100%;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.about h2 {
    font-family: var(--head);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
}
.about h2 em { color: var(--accent); font-style: italic; }
.about p { color: var(--muted); font-weight: 300; margin-bottom: 0.8rem; max-width: 400px; }

.skills { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.4rem; }
.skills span {
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.78rem;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    transition: border-color 0.2s, color 0.2s;
}
.skills span:hover { border-color: var(--accent); color: var(--accent); }

/* --- Teaser --- */
.teaser {
    padding: 80px 8%;
    border-top: 1px solid var(--border);
    max-width: var(--max);
    margin: 0 auto;
    width: 100%;
}

.teaser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.teaser-header h2 {
    font-family: var(--head);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
}

.teaser-list { display: flex; flex-direction: column; }

.teaser-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.3rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--fg);
    transition: color 0.2s;
}
.teaser-item:first-child { border-top: 1px solid var(--border); }
.teaser-item:hover { color: var(--accent); }
.teaser-item:hover .arrow { transform: translate(3px,-3px); }

.num { font-family: var(--head); font-size: 0.78rem; color: var(--muted); min-width: 26px; }
.teaser-title { flex: 1; font-family: var(--head); font-weight: 700; font-size: 1rem; }
.arrow { font-size: 1.3rem; color: var(--muted); transition: transform 0.2s, color 0.2s; }
.teaser-item:hover .arrow { color: var(--accent); }

/* --- Page Header (projects page) --- */
.page-header {
    padding: 160px 8% 70px;
    border-bottom: 1px solid var(--border);
    animation: fadeUp 0.7s ease both;
}
.page-header h1 {
    font-family: var(--head);
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.8rem;
}
.page-header p { color: var(--muted); font-weight: 300; max-width: 400px; }

/* --- Project Cards --- */
.projects { padding: 70px 8% 100px; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
    max-width: var(--max);
    margin: 0 auto;
}

.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(200,240,96,0.35); transform: translateY(-4px); }

.card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #1a1a1a;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.card:hover .card-img img { transform: scale(1.05); }

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,13,13,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}
.card:hover .card-overlay { opacity: 1; }

.overlay-btn {
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    font-family: var(--head);
    font-size: 0.82rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}
.overlay-btn:hover { background: var(--accent); color: #0d0d0d; }

.card-body { padding: 1.4rem; }
.card-body .num { font-size: 0.72rem; font-family: var(--head); color: var(--accent); letter-spacing: 0.1em; display: block; margin-bottom: 0.4rem; }
.card-body h3 { font-family: var(--head); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-body p { font-size: 0.86rem; color: var(--muted); font-weight: 300; margin-bottom: 1rem; line-height: 1.55; }

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.tags span {
    background: #1f1f1f;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.7rem;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
}

.card-link {
    font-family: var(--head);
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--accent);
    transition: letter-spacing 0.2s;
}
.card-link:hover { letter-spacing: 0.05em; }

/* --- Footer --- */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 70px 8%;
}

footer h2 {
    font-family: var(--head);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
}
footer h2 em { color: var(--accent); font-style: italic; }
.footer-sub { color: var(--muted); font-weight: 300; max-width: 380px; margin-bottom: 2.5rem; }

.contact-links { border-top: 1px solid var(--border); margin-bottom: 2.5rem; }
.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
    transition: color 0.2s;
    gap: 1rem;
}
.contact-row:hover { color: var(--accent); }
.clabel {
    font-family: var(--head);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-width: 55px;
}

.social-row { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.social-row a {
    font-family: var(--head);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    transition: color 0.2s;
    letter-spacing: 0.03em;
}
.social-row a:hover { color: var(--accent); }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; }
.footer-bottom .logo { font-family: var(--head); font-weight: 800; font-size: 1.2rem; color: var(--muted); }
.copy { font-size: 0.78rem; color: var(--muted); opacity: 0.5; }

/* --- Animation --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 720px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    nav ul { gap: 1.2rem; }
    .cta-row { flex-direction: column; }
    .btn-fill, .btn-outline { text-align: center; }
    .teaser-header { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .contact-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .page-header { padding: 130px 6% 50px; }
    .about, .teaser { padding-left: 6%; padding-right: 6%; }
    .hero { padding-left: 6%; padding-right: 6%; }
    .projects { padding-left: 6%; padding-right: 6%; }
    footer { padding-left: 6%; padding-right: 6%; }
}

@media (max-width: 480px) {
    .project-grid { grid-template-columns: 1fr; }
    nav ul { display: none; }
}
