/* ═══════════════════════════════════════════════════════════════
   George Khawly, P.E. — Professional Engineering Portfolio
   Institutional aesthetic: NASA, MIT, ASME inspired
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #161616;
    --text: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #222222;
    --border-hover: #333333;
    --accent: #c2410c;
    --accent-hover: #ea580c;
    --accent-glow: rgba(194, 65, 12, 0.2);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
    font-family: var(--font);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ── Layout ── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Header ── */
.site-header {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.header-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
}

.header-title {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem 0;
}

.header-nav a:hover {
    color: var(--text);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.header-nav a:hover::after {
    width: 100%;
}

/* ── Hero ── */
.hero {
    padding: 5rem 0 4rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(194, 65, 12, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(194, 65, 12, 0.05) 0%, transparent 40%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.6fr;
    gap: 3rem;
    align-items: center;
}

.hero-grid.no-photo {
    grid-template-columns: 1fr;
}

.hero-text {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.15s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-kicker {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero h1 {
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.pe {
    font-size: 0.5em;
    font-weight: 600;
    vertical-align: super;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.hero-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.hero-meta span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-meta strong {
    color: var(--text);
    font-weight: 700;
    font-size: 1.1em;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.25rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    color: var(--text);
}

/* ── Photo Placeholder ── */
.hero-photo {
    display: flex;
    justify-content: center;
}

.photo-placeholder {
    width: 240px;
    height: 300px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-elevated);
}

.photo-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.photo-placeholder p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Sections ── */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.section-alt {
    background: var(--bg-elevated);
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.about-main p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-block {
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.info-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 2px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.info-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.info-block:hover::before {
    opacity: 1;
}

.info-block h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.info-block ul {
    list-style: none;
}

.info-block li {
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.info-block li:last-child {
    border-bottom: none;
}

.info-block p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.pe-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15em 0.5em;
    background: var(--accent);
    color: #fff;
    border-radius: 3px;
    margin-right: 0.4em;
    vertical-align: middle;
}

/* ── Experience ── */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-item {
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 2px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.experience-item:hover::before {
    opacity: 1;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-title h3 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    color: var(--text);
}

.exp-org {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.exp-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    background: var(--bg-elevated);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.exp-duties {
    list-style: none;
    margin-bottom: 1rem;
}

.exp-duties li {
    padding: 0.3rem 0 0.3rem 1rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.exp-duties li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.exp-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: default;
}

.exp-tags span:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Education ── */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.education-card {
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.education-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 2px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.education-card:hover::before {
    opacity: 1;
}

.edu-degree {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.edu-minor {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.edu-school {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.edu-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Publications ── */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pub-item {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
    transition: transform 0.35s ease, border-left-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0 6px 6px 0;
}

.pub-item:hover {
    border-left-color: var(--accent);
    transform: translateX(5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.pub-item:first-child {
    border-radius: 6px 6px 6px 0;
}

.pub-item:last-child {
    border-bottom: 1px solid var(--border);
    border-radius: 0 6px 6px 6px;
}

.pub-item:last-child:hover {
    border-bottom-color: var(--border);
}

.pub-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.pub-year {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
}

.pub-venue {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pub-item h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-weight: 500;
}

.pub-item h3 a {
    color: var(--text);
}

.pub-item h3 a:hover {
    color: var(--accent-hover);
}

.pub-item h3 a[target="_blank"]::after {
    content: '';
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-left: 0.35em;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.pub-item h3 a[target="_blank"]:hover::after {
    opacity: 1;
}

.pub-authors {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Contact ── */
.contact-section {
    padding: 3rem 0;
    text-align: center;
}

.contact-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.contact-links a:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--accent-hover);
}

/* ── Footer ── */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .photo-placeholder {
        width: 200px;
        height: 250px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .exp-header {
        flex-direction: column;
    }

    .section {
        padding: 3rem 0;
    }
}