/* CSS Variables */
:root {
    --bg: #050505;
    --text-white: #D9D9D9;
    --text-gray: #737373;
    --line: #262626;
    --green: #66FF66;
    --font: 'Geist Mono', monospace;

    /* Spacing variables for consistency */
    --space-divider: 32px;
    --space-section: 0;
    --space-title-body: 24px;
}

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

html {
    font-size: 14px;
}

body {
    background-color: var(--bg);
    color: var(--text-white);
    font-family: var(--font);
    font-size: 0.85rem;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container - aligned to top-left for terminal feel */
.container {
    max-width: 720px;
    margin: 0;
    padding: 40px 48px;
}

/* Header / Logo */
.header {
    margin-bottom: 24px;
}

.logo {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.logo-line {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeInUp 0.5s ease forwards;
}

.logo-line:nth-child(2) {
    animation-delay: 0.1s;
}

/* Logo scramble on hover */
.logo.scrambling .logo-line {
    animation: none;
    opacity: 1;
    transform: none;
}

/* Tagline */
.tagline {
    margin-bottom: 0;
}

.tagline-text {
    font-size: 0.85rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Typewriter cursor */
.typewriter-cursor {
    display: inline-block;
    width: 6px;
    height: 12px;
    background-color: var(--text-white);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Green dot blink - slow, sleek like recording indicator */
@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.green-dot {
    color: var(--green);
    animation: dotBlink 2s ease-in-out infinite;
}

/* Divider */
.divider {
    height: 1px;
    background-color: var(--line);
    margin: var(--space-divider) 0;
    width: 100%;
}

/* Section */
.section {
    margin: var(--space-section) 0;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: var(--space-title-body);
    letter-spacing: 0.02em;
}

/* Color utilities */
.gray {
    color: var(--text-gray);
}

.green {
    color: var(--green);
}

/* Team Grid */
.team-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-row {
    display: grid;
    grid-template-columns: 36px 150px 110px auto 1fr;
    align-items: baseline;
    gap: 16px;
}

.col-links {
    justify-self: start;
}

.team-header {
    display: none;
}

/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-header {
    display: grid;
    grid-template-columns: 36px 110px 140px 120px 50px 80px;
    gap: 16px;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.portfolio-row {
    display: grid;
    grid-template-columns: 36px 110px 140px 120px 50px 80px;
    align-items: baseline;
    gap: 16px;
}

.status-active {
    color: var(--green);
}

/* Links */
.link {
    color: var(--text-gray);
    transition: color 0.2s ease;
}

.col-links {
    display: flex;
    gap: 12px;
}

/* Hover Link Animation */
.hover-link {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.hover-link:hover {
    color: var(--text-white);
}

.hover-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--green);
    transition: width 0.3s ease;
}

.hover-link:hover::after {
    width: 100%;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.company-name {
    font-size: 0.85rem;
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

.address {
    font-size: 0.85rem;
    line-height: 1.5;
}

.contact-link {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Scramble text effect */
[data-scramble] {
    position: relative;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial states for animated elements */
.section {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.5s ease forwards;
}

.section:nth-of-type(1) {
    animation-delay: 0.7s;
}

.section:nth-of-type(2) {
    animation-delay: 0.9s;
}

.footer {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 1.1s;
}

.divider {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
}

.divider:nth-of-type(1) {
    animation-delay: 0.6s;
}

.divider:nth-of-type(2) {
    animation-delay: 0.8s;
}

.divider:nth-of-type(3) {
    animation-delay: 1s;
}

/* Responsive Design */

/* Tablet & smaller desktop */
@media (max-width: 768px) {
    :root {
        --space-divider: 24px;
        --space-title-body: 16px;
    }

    .container {
        padding: 32px 24px;
    }

    .team-row {
        display: grid;
        grid-template-columns: 36px 1fr auto;
        gap: 8px;
        align-items: baseline;
    }

    .team-row .col-id {
        grid-column: 1;
    }

    .team-row .col-name {
        grid-column: 2;
    }

    .team-row .col-location {
        display: none;
    }

    .team-row .col-links {
        grid-column: 3;
        font-size: 0.75rem;
        gap: 6px;
    }

    .portfolio-header {
        display: none;
    }

    .portfolio-grid {
        gap: 0;
    }

    .portfolio-row {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .portfolio-row:first-child {
        padding-top: 0;
    }

    .portfolio-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* Mobile portfolio layout */
    .portfolio-row .col-pid {
        display: none;
    }

    .portfolio-row .col-pname {
        color: var(--text-white);
    }

    .portfolio-row .col-pdesc,
    .portfolio-row .col-pwebsite,
    .portfolio-row .col-pyear,
    .portfolio-row .col-pstatus {
        display: block;
    }

    .footer {
        flex-direction: column;
        gap: 16px;
    }

    .footer-right {
        order: -1;
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --space-divider: 20px;
        --space-title-body: 14px;
    }

    html {
        font-size: 13px;
    }

    .container {
        padding: 24px 20px;
    }

    .header {
        margin-bottom: 20px;
    }

    .logo {
        font-size: 0.9375rem;
    }

    .team-grid {
        gap: 12px;
    }

    .team-row .col-links {
        flex-direction: row;
        gap: 6px;
    }

    .portfolio-row {
        padding: 10px 0;
    }
}

/* Large screens - keep content top-left */
@media (min-width: 1200px) {
    .container {
        max-width: 720px;
        padding: 48px 60px;
    }
}
