﻿/* =========================================
   PAUL KOVACS ACADEMIC THEME
   IEEE-INSPIRED PROFESSIONAL DESIGN (FINAL WIRED)
========================================= */

:root {

    /* BRAND */
    --primary: #1f4e79;
    --primary-light: #5b8fc2;

    /* NEUTRAL */
    --bg: #f5f7fb;
    --text: #1a1f2b;
    --muted: #5f6b7a;
    --card: #ffffff;
    --border: #e6e9ef;
    --surface-soft: #eef4fb;

    /* LAYOUT */
    --surface-width: 1100px;

    /* EFFECTS */
    --radius: 10px;
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.04);
    --transition: 0.2s ease;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* FOCUS */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: 6px;
}

/* BODY */

body {
    margin: 0;

    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);

    font-size: 1rem;
    line-height: 1.5;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* SELECTION */
::selection {
    background: rgba(31, 78, 121, 0.25);
    color: #fff;
}

/* =========================================
   TYPOGRAPHY
========================================= */

h1, h2, h3 {
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.95rem;
}

p {
    margin-top: 0.65rem;
    max-width: 75ch;
}

/* LINKS */
a {
    color: var(--primary);
    text-underline-offset: 2px;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* IMAGES */
img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   LAYOUT SYSTEM (UNIFIED WIDTH)
========================================= */

.container {
    width: 100%;
    max-width: var(--surface-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* unify surfaces */
.card,
.links-wrapper,
.links,
.site-header,
.footer {
    width: 100%;
    max-width: var(--surface-width);
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   HEADER
========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);

    border-bottom: 1px solid rgba(230, 233, 239, 0.8);

    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* fallback */
@supports not (backdrop-filter: blur(10px)) {
    .site-header {
        background: rgba(255, 255, 255, 0.98);
    }
}

.brand {
    display: inline-flex;
    align-items: center;

    font-weight: 700;
    font-size: 1.08rem;
    color: var(--primary);

    padding: 0.5rem 1rem;
    border-radius: 999px;

    background: linear-gradient(180deg, #f5f9ff, #edf4fb);
    border: 1px solid #d9e5f3;

    box-shadow: var(--shadow-soft);
}

.nav {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;

    padding: 0.5rem 0.95rem;
    border-radius: 999px;

    transition: background var(--transition),
                transform var(--transition);
}

.nav a:hover {
    background: var(--surface-soft);
    transform: translateY(-1px);
}

/* =========================================
   CARD SYSTEM
========================================= */

.card {
    background: var(--card);
    padding: 1.5rem;

    border-radius: var(--radius);
    border: 1px solid var(--border);

    box-shadow: var(--shadow);

    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* =========================================
   🔷 ADDITIONAL LINKS SECTION (RESTORED STYLE)
========================================= */

.links-wrapper {
    margin-top: 1.75rem;
}

/* SECTION HEADER (RESTORED EMPHASIS) */
.links-heading {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: #ffffff;

    padding: 1rem 1.25rem;

    border-radius: var(--radius) var(--radius) 0 0;

    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.4px;

    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

/* GRID CONTAINER */
.links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;

    padding: 1.25rem;

    background: linear-gradient(180deg, #ffffff, #fbfcff);
    border: 1px solid var(--border);
    border-top: none;

    border-radius: 0 0 var(--radius) var(--radius);

    box-shadow: var(--shadow);

    align-items: stretch;
}

/* LINK CARDS (RESTORED VISUAL DEPTH) */
.links a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 58px;
    width: 100%;

    padding: 1rem;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);

    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;

    color: var(--primary);

    transition: all var(--transition);

    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.links a:hover {
    background: var(--surface-soft);
    border-color: var(--primary);

    transform: translateY(-2px);

    box-shadow: 0 6px 14px rgba(31, 78, 121, 0.12);
}

/* =========================================
   LISTS
========================================= */

ul {
    margin-top: 0.8rem;
    padding-left: 1.4rem;
}

ul li {
    margin-bottom: 0.35rem;
}

/* =========================================
   FOOTER
========================================= */

.footer {
    margin-top: auto;
    text-align: center;

    padding: 2rem 1rem;

    font-size: 0.9rem;
    color: var(--muted);

    border-top: 1px solid var(--border);

    background: linear-gradient(180deg, #fff, #fbfcfe);
}

/* =========================================
   SPACING
========================================= */

section {
    margin-bottom: 2rem;
}

/* =========================================
   RESPONSIVE Mobile
========================================= */

/* =========================================
   RESPONSIVE MOBILE RULE
========================================= */

/* =========================================
   RESPONSIVE MOBILE RULE
========================================= */

/* =========================================
   RESPONSIVE MOBILE RULE
========================================= */

@media (max-width: 768px) {

    .container {
        width: 100%;
        max-width: 100%;
    }

    .nav {
        justify-content: center;
    }

    /* LINKS */
    .links {
        grid-template-columns: 1fr;
    }

    /* HERO MOBILE LAYOUT */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    /* PROFILE ONLY (photo + text under photo) */
    .hero-grid aside {
        text-align: center;
    }

    .profile-image {
        width: 160px;
        max-width: 100%;
        display: block;
        margin: 0 auto;
    }

    /* PROFILE TEXT UNDER PHOTO (UPDATED TYPOGRAPHY) */
    .hero-grid aside .profile-name {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-top: 0.75rem;
    }

    .hero-grid aside .profile-affiliation {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-top: 0.5rem;
    }

    /* CONSISTENT SECTION SPACING */
    section {
        margin-bottom: 1.25rem;
    }
}

/* CONSISTENT CARD WIDTH ACROSS SITE */
.card {
    width: 100%;
}